﻿<UserControl x:Class="TicketServer.Controls.TicketStatus"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:a="clr-namespace:TicketServer.Interfaces.Attributes;assembly=TicketServer.Interfaces"
			 xmlns:c="clr-namespace:TicketServer.Common;assembly=TicketServer.Common"
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:i="clr-namespace:TicketServer.Interfaces.Enums;assembly=TicketServer.Interfaces"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
			 xmlns:lex="http://wpflocalizeextension.codeplex.com"
			 lex:LocalizeDictionary.DesignCulture="en"
			 lex:ResxLocalizationProvider.DefaultAssembly="TicketServer.Controls"
			 lex:ResxLocalizationProvider.DefaultDictionary="Resources"
			 d:DesignWidth="500"
			 mc:Ignorable="d">
	<UserControl.Resources>
		<a:EnumToFriendlyNameConverter x:Key="enumItemsConverter" />
		<c:Code39ValueConverter x:Key="code39Converter" />
		<c:BoolToVisibilityConverter x:Key="boolToVisibilityConverter" />
	</UserControl.Resources>
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="100" />
			<ColumnDefinition />
			<ColumnDefinition Width="100" />
			<ColumnDefinition />
			<ColumnDefinition Width="*" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>

		<Grid.RowDefinitions>
			<RowDefinition Height="18" />
			<RowDefinition Height="18" />
			<RowDefinition Height="18" />
			<RowDefinition Height="18" />
			<RowDefinition Height="18" />
			<RowDefinition Height="18" />
		</Grid.RowDefinitions>

		<TextBlock Grid.Row="0"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextId}" />
		<TextBlock x:Name="textBlockId"
				   Grid.Row="0"
				   Grid.Column="1"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Id}" />

		<TextBlock Grid.Row="0"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextCode}" />
		<TextBlock x:Name="textBlockCode"
				   Grid.Row="0"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Code,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="1"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextName}" />
		<TextBlock x:Name="textBlockName"
				   Grid.Row="1"
				   Grid.Column="1"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Name,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="1"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextStreet}" />
		<TextBlock x:Name="textBlockStreet"
				   Grid.Row="1"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Street,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="2"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextZip}" />
		<TextBlock x:Name="textBlockZip"
				   Grid.Row="2"
				   Grid.Column="1"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Zip,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="2"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextCity}" />
		<TextBlock x:Name="textBlockCity"
				   Grid.Row="2"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.City,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="3"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextPhone}" />
		<TextBlock x:Name="textBlockPhone"
				   Grid.Row="3"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Phone,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="3"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextMail}" />
		<TextBlock x:Name="textBlockEMail"
				   Grid.Row="3"
				   Grid.Column="1"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.EMail,
								  Mode=OneWay}" />

		<TextBlock Grid.Row="4"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextRedeemed}" />
		<CheckBox x:Name="checkBoxRedeemed"
				  Grid.Row="4"
				  Grid.Column="1"
				  Margin="5 0 0 0"
				  VerticalAlignment="Center"
				  IsChecked="{Binding Ticket.IsRedeemed,
									  Mode=OneWay}"
				  IsEnabled="False" />

		<TextBlock Grid.Row="4"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextRedeemDate}" />
		<TextBlock x:Name="textBlockRedeemDate"
				   Grid.Row="4"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.RedeemDate,
								  Mode=OneWay,
								  StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" />

		<TextBlock Grid.Row="5"
				   Grid.Column="0"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextOnline}" />
		<CheckBox x:Name="checkBoxOnline"
				  Grid.Row="5"
				  Grid.Column="1"
				  Margin="5 0 0 0"
				  VerticalAlignment="Center"
				  IsChecked="{Binding Ticket.IsOnlineTicket,
									  Mode=OneWay}"
				  IsEnabled="False" />

		<TextBlock Grid.Row="5"
				   Grid.Column="2"
				   HorizontalAlignment="Right"
				   VerticalAlignment="Center"
				   Text="{lex:LocText TextType}" />
		<TextBlock x:Name="textBlockType"
				   Grid.Row="5"
				   Grid.Column="3"
				   Margin="3 0 0 0"
				   HorizontalAlignment="Left"
				   VerticalAlignment="Center"
				   FontWeight="Bold"
				   Text="{Binding Ticket.Type,
								  Mode=OneWay,
								  Converter={StaticResource enumItemsConverter}}" />

		<TextBlock Grid.Row="0"
				   Grid.RowSpan="6"
				   Grid.Column="4"
				   Margin="15 0"
				   HorizontalAlignment="Center"
				   VerticalAlignment="Center"
				   FontFamily="C39HrP48DhTt"
				   FontSize="100"
				   SnapsToDevicePixels="True"
				   Text="{Binding Ticket.Code,
								  Converter={StaticResource ResourceKey=code39Converter}}" />

		<Image x:Name="imageRedeemed"
			   Grid.Row="0"
			   Grid.RowSpan="6"
			   Grid.Column="5"
			   Source="Icons\XLarge\clean.png"
			   Visibility="{Binding Ticket.IsRedeemed,
									Converter={StaticResource ResourceKey=boolToVisibilityConverter}}" />
	</Grid>
</UserControl>
